package main

import (
	"reflect"
	"fmt"
)

type User struct {
	Name string "username:required"
	Password string "password:required"
}

func main() {
	user:=&User{"wyx","0x0052aaaeedffsdsfcvg"}
	s:=reflect.TypeOf(user).Elem()//通过type定义
	for i:=0;i<s.NumField();i++{
		fmt.Println(s.Field(0).Tag)
	}
}

